package com.example.restfuldemo.service;

import com.example.restfuldemo.entity.User;
import com.example.restfuldemo.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class UserService {

    @Autowired
    UserMapper userMapper;

    public List<User> getAllUser() {
        return userMapper.getAllUser();
    }

    public Integer addUser(User user) {
        return userMapper.addUser(user);
    }

    public Integer updateUser(User user) {
        return userMapper.updateUser(user);
    }

    public Integer deleteUser(Integer id) {
        return userMapper.deleteUser(id);
    }



}
